{% extends "base.html" %}

{% load i18n %}

{% block title %}{% trans "Preview comment" %}{% endblock %}

{% block content %}

<h1>{% trans "Preview your comment" %}</h1>

<form action="../postfree/" method="post">
	{% if comment_form.has_errors %}
	<h2 class="error">{% trans "Please correct the following errors" %}</h2>
	{% else %}
	<fieldset>
	    <div class="comment">
			{{ comment.comment|escape|urlizetrunc:"40"|linebreaks }}
			<p class="date small">Posted by <strong>{{ comment.person_name }}</strong></p>

	    </div>
    </fieldset>
	    <input type="submit" name="post" value="{% trans "Post public comment" %}" />
	
	
	<h2>{% trans "Or edit it again" %}</h2>
	{% endif %}
	<fieldset>
	{% if comment_form.person_name.errors %}
	    {{ comment_form.person_name.html_error_list }}
	{% endif %}

		<dl>
			<dt><label for="id_person_name">{% trans "Your name" %}:</label></dt>

			<dd>{{ comment_form.person_name }}</dd>
		</dl>

	{% if comment_form.comment.errors %}
		{{ comment_form.comment.html_error_list }}
	{% endif %}

		<dl>
			<dt><label for="id_comment">{% trans "Comment" %}:</label></dt>
			<dd>{{ comment_form.comment }}</dd>
		</dl>

		
		<input type="hidden" name="options" value="{{ options }}" />
		<input type="hidden" name="target" value="{{ target }}" />
		<input type="hidden" name="gonzo" value="{{ hash }}" />
		
		<input type="submit" name="preview" value="{% trans "Preview revised comment" %}" />
	</fieldset>
</form>
{% endblock %}
